# @Time : 2024-10-23 9:58
# @Author : Fioman 
# @Phone : 13149920693
lstVal = [1, 2, 3]
a, b, c = lstVal  # 解包,unpack
print(lstVal, a, b, c)

lstVal = 7, 8, 9  # 打包,pack
print(lstVal)

# 所以可以利用打包和解包语法,来直接交换两个元素的值
a, b = 10, 20
print(f"交换前: a = {a}, b = {b}")
a, b = b, a
print(f"交换后: a = {a}, b = {b}")
